package yu.code.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import yu.code.usercenter.model.domain.User;

import javax.servlet.http.HttpServletRequest;

/**
 * 用户服务
 *
 * @author yu
 */
public interface UserService extends IService<User> {
    /**
     * 用户注册
     *
     * @param userAccount   账号
     * @param userPassword  密码
     * @param checkPassword 确认密码
     * @return 新用户id
     */
    long userRegister(String userAccount, String userPassword, String checkPassword,String registerCode);

    User userLogin(String userAccount, String userPassword, HttpServletRequest request);
    Integer userLogout(HttpServletRequest request);

    User getSafeUser(User originUser);
}
